package com.leoman.reourceapi.service;

import com.leoman.exception.*;
import com.leoman.resources.entity.GameResource;
import com.leoman.resources.entity.MusicResource;
import com.leoman.resources.entity.StillResource;
import org.springframework.data.domain.Page;

/**
 * 资源接口类
 * Created by 涂奕恒 on 2016/6/12.
 */
public interface ResourceApiService {

    // 剧照列表
    Page<StillResource> iPageStillList(Integer pageNum, Integer pageSize);

    // 剧照详情
    StillResource iFindOneStill(Long id) throws ParamsErrorException, WelfareNotFindException;

    // 音乐列表
    Page<MusicResource> iPageMusicList(Integer pageNum, Integer pageSize);

    // 音乐详情
    MusicResource iFindOneMusic(Long id) throws ParamsErrorException, WelfareNotFindException;

    // 游戏列表
    Page<GameResource> iPageGameList(Integer pageNum, Integer pageSize);

    // 游戏详情
    GameResource iFindOneGame(Long id, Long userId)
            throws ParamsErrorException,
            WelfareNotFindException,
            UserNotFindException,
            UserStatusErrorException;

    // 下载资源（播放音乐）
    Boolean downResource(Long id, Integer type, Long userId, Integer flag)
            throws ParamsErrorException,
            ResourceNotFindException,
            UserNotFindException,
            UserStatusErrorException;
}
